#pragma once

#include <iostream>
#include <string>
#include "Worke.h"
using namespace std;



template<typename T>
class QueueTp
{
public:
	QueueTp(int qs = MAX) :qsize(qs)
	{
		front = rear = NULL;
		items = 0;
	}
	~QueueTp()
	{
		Node* temp;
		while (front!=NULL)
		{
			temp = front;
			front = front->next;
			delete temp;
		}
	}
	bool isempty()const;
	bool isfull()const;
	int queuecount()const;
	bool enqueue(const T& item);
	bool dequeue(T& item);
private:
	enum { MAX = 10 };
	struct Node { T data; Node* next; };
	Node* front;
	Node* rear;
	int items;
	int qsize;
};



